import time
def clock_deco(func):
    def wrap(*args):
        start_time = time.time()
        result = func(*args)
        end_time = time.time()
        print(f"{func.__name__} 执行时长为：{format(end_time - start_time, '.2f')}s")
        return result
    return wrap

@clock_deco
def foo(a, b):
    num = 0
    while True:
        if num >= a ** b:
            break
        num += 1

foo(4,12) # foo 执行时长为：11.53s